home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group02b.txt
/
000146_icon-group-sender_Mon Nov 25 07:57:00 2002.msg
< prev
next >
Wrap
Internet Message Format
|
2003-01-02
|
2KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id gAPEtXI03573
for icon-group-addresses; Mon, 25 Nov 2002 07:55:33 -0700 (MST)
Message-Id: <200211251455.gAPEtXI03573@baskerville.CS.Arizona.EDU>
From: "Michael Borek" <MichaelBorek@eastlink.ca>
X-Newsgroups: comp.lang.icon
Subject: Re: delete( L, i )
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Date: Sun, 24 Nov 2002 20:06:29 -0400
To: icon-group@cs.arizona.edu
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
"ernobe" <ernobe@msn.com> wrote in message
news:MPG.184a61341eeee86c98999d@news.CIS.DFN.DE...
>
> I got an e-mail from Clint Jeffery in which he says that the delete( L,
i )
> function is not part of Icon, but of Unicon. Instead of bothering him
with
[SNIP]
It is documented as producing error 122 X not set or table.
however, the following occur:
delete(L, i) destructively deletes the ith member of L. Fails if i > *L
key(L) generates the indices ("keys") of L. Documented as producing error
124 T not table.
insert(L, i, x) replaces the ith member of L with x. Fails if i > *L
member(L, x) produces error 122
--
|***| Michael Borek "Death before Dishonour; Beer before Lunch"
|:. | Independent Software Contractor
|. :| http://users.eastlink.ca/~borekking/professionalhome.html
\___/
>
> procedure main()
> me := [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
> ab := [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
> every 1 to 2 do
> every delete( ab, !me )
> every writes( " ", string( ab[ 1 to 10 ] ) )
> end
>
>
> This program prints this:
>
> 4 8
>
> Which is what it should if delete(L, i) does work in Icon.
> --
> my esoteric links:
> http://www.costarricense.cr/pagina/ernobe/